package co.yixiang.modules.system.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;

@Getter
@AllArgsConstructor
public enum ShopStatusEnum {

	/**
	 * 待审批
	 */
	PENDING("0", "待审批"),

	/**
	 * 审批通过
	 */
	PASS("1", "审批通过"),

	/**
	 * 审批驳回
	 */
	REJECT("1", "审批驳回");

	private String value;

	private String desc;

	public static ShopStatusEnum toType(String value) {
		return Stream.of(ShopStatusEnum.values())
				.filter(p -> p.value.equals(value))
				.findAny()
				.orElse(null);
	}

	public String value() {
		return this.value;
	}

}
